package com.example.bitmaploading;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;

/**
 * base activity </br>
 * 
 * @author HAYUKLEUNG
 */
public abstract class BaseActivity extends Activity
{
	/** 屏幕宽高，标题栏高度 */
	//public static int displayWidth;
	//public static int displayHeight;
	//public static int statusBarHeight;

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		super.onCreate(savedInstanceState);
		//getParameters();
	}

	/**
	 * 获取屏幕宽高等参数
	 */
	/*
	private void getParameters()
	{
		DisplayMetrics displayMetrics = new DisplayMetrics();
		getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
		displayWidth = displayMetrics.widthPixels;
		displayHeight = displayMetrics.heightPixels;
		//
		Class<?> c = null;
		Object obj = null;
		Field field = null;
		int x = 0, sbar = 0;
		try
		{
			c = Class.forName("com.android.internal.R$dimen");
			obj = c.newInstance();
			field = c.getField("status_bar_height");
			x = Integer.parseInt(field.get(obj).toString());
			sbar = getResources().getDimensionPixelSize(x);
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		statusBarHeight = sbar;
	}
	*/
}
